package mc.web.decorators;


import java.util.Locale;
import java.util.ResourceBundle;

import mc.domain.Lekarz;
import org.displaytag.decorator.TableDecorator;

public class EditDeleteLekarzDekorator extends TableDecorator {
	
	private Locale loc = new Locale("pl","PL");
	private ResourceBundle res = ResourceBundle.getBundle("messages", loc);
	
	public String getLink1(){
		
	 Lekarz obj = (Lekarz)getCurrentRowObject();
	 int oid= obj.getId();
	 StringBuffer html = new StringBuffer();
	 
	 html.append("<a href=\"form.html?id=");
	 html.append(oid);
	 html.append("\">"+res.getString("decorator.edytuj")+"</a>");
	 html.append("&nbsp;|&nbsp;");
	 html.append("<a href=\"lista.html?action=delete&id=");
	 html.append(oid);
	 html.append("\"");
	 html.append(" onclick=\"return confirm('"+res.getString("decorator.czynapewno")+"')\">");
	 html.append(res.getString("decorator.usun")+"</a>");
	 
	 return html.toString();
	
	}
}
